Crate lightspark

source ·
Expand description

Lightspark Rust SDK is a thin wrapper around the GraphQL API that provides an easy way to integrate with the Lightspark systems in a Rust environment.

Getting Started

After obtain an API token, a client can be initiate.

use lightspark::request::auth_provider::AccountAuthProvider;
use lightspark::client::LightsparkClient;
use lightspark::key::RSASigningKey;

let api_id = "<your api token id>";
let api_token = "<your api token secret>";
let auth_provider = AccountAuthProvider::new(api_id.to_string(), api_token.to_string());
let client = match LightsparkClient::<RSASigningKey>::new(auth_provider) {
   Ok(value) => value,
   Err(err) => {
      println!("{}", err);
      return;
   }
};

You are now ready to use the Lightspark SDK!

See more examples in examples/example.rs

Modules

Constants

  • The version of this library.